import request from '@/utils/request';

export async function getDetail(params) {
  return request(`/osApi/insAddDet/insAddDetInfo`, {
    method: 'POST',
    body: params,
  });
}
export async function getDictData(params) {
  return request(`/osApi/insAddDet/getInsAddDetDict`, {
    method: 'POST',
    body: params,
  });
}
export async function getInsInfor(params) {
  return request(`/osApi/insAddDet/getInsAddDetInfoNew`, {
    method: 'POST',
    body: params,
  });
}
export async function updateInsData(params) {
  return request(`/osApi/insAddDet/updateInsAddDet`, {
    method: 'POST',
    body: params,
  });
}
export async function getRemarkData(params) {
  return request(`/osApi/insAddDet/listInsAddRemark`, {
    method: 'POST',
    body: params,
  });
}
export async function addRemarkData(params) {
  return request(`/osApi/insAddDet/addInsAddRemark`, {
    method: 'POST',
    body: params,
  });
}
export async function getSingleData(params) {
  return request(`/csApi/custInsAcco/get`, {
    method: 'POST',
    body: params,
  });
}
// 获得工伤二级户列表
export async function getInjList(params) {
  return request('/osApi/insAddDet/getInjSecAcco', {
    method: 'POST',
    body: params,
  });
}

export async function getSocialAdd(params) {
  return request('/osApi/insAddDet/pageListInsAdd', {
    method: 'POST',
    body: params,
  });
}

export async function getProList(params) {
  return request('/osApi/problem/ins/pageList', {
    method: 'POST',
    body: params,
  });
}

// 默认大库
export async function getDefaultLibrary(params) {
  return request('/osApi/insAddDet/checkNoSuppAccoList', {
    method: 'POST',
    body: params,
  });
}

// 字典
export async function getDictionary(params) {
  return request('/osApi/mdm/nmDict/queryDictItemsByCodes', {
    method: 'POST',
    body: params,
  });
}

// 是否五险合一
export async function getParam(params) {
  return request('/osApi/operParam/getParam', {
    method: 'POST',
    body: params,
  });
}

export async function getDictList(params) {
  return request('/osApi/insAddDet/dictList', {
    method: 'POST',
    body: params,
  });
}

export async function remarkOk(params) {
  return request('/osApi/insAddDet/addInsAddRemark', {
    method: 'POST',
    body: params,
  });
}

export async function getDeclList(params) {
  return request('/osApi/insAddDet/queryDeclDetInsAddTemplate', {
    method: 'POST',
    body: params,
  });
}

export async function markingResult(params) {
  return request('/osApi/problem/ins/signProbFlag', {
    method: 'POST',
    body: params,
  });
}

// export async function confirmInter(params) {
//   return request('/osApi/insAddDet/cancelDecl', {
//     method: 'POST',
//     body: params,
//   });
// }

export async function confirmInter(params) {
  return request('/osApi/insAddDetExt/cancelDecl', {
    method: 'POST',
    body: params,
  });
}

// export async function signSuccess(params) {
//   return request('/osApi/insAddDet/completeDecl', {
//     method: 'POST',
//     body: params,
//   });
// }

export async function signSuccess(params) {
  return request('/osApi/insAddDetExt/completeDecl', {
    method: 'POST',
    body: params,
  });
}

export async function signFail(params) {
  return request('/osApi/insAddDet/declFail', {
    method: 'POST',
    body: params,
  });
}

export async function onDeclare(params) {
  return request('/osApi/insAddDet/syncInsAddOnLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function offDeclare(params) {
  // return request('/osApi/insAddDet/underLineDecl', {
  // 异步接口
  return request('/osApi/insAddDet/syncInsAddUnderLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function bigApply(params) {
  return request('/osApi/insAddDet/onLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function offBigApply(params) {
  // return request('/osApi/insAddDet/underLineDecl', {
  // 异步接口
  return request('/osApi/insAddDet/syncInsAddUnderLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function singleApply(params) {
  return request('/osApi/insAddDet/onLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function offSingleApply(params) {
  return request('/osApi/insAddDet/syncInsAddUnderLineDecl', {
    method: 'POST',
    body: params,
  });
}

export async function changeArea(params) {
  return request('/osApi/mdm/nmArea/queryNmArea', {
    method: 'POST',
    body: params,
  });
}

export async function getProgress(params) {
  return request(`/osApi/batchTask/getBatTaskInfo`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function problemGet(params) {
  return request(`/osApi/problem/ins/get`, {
    method: 'POST',
    body: params,
  });
}

export async function insertProbFdbk(params) {
  return request(`/osApi/problem/ins/insertProbFdbk`, {
    method: 'POST',
    body: params,
  });
}

export async function cancelProbFlag(params) {
  return request(`/osApi/problem/ins/cancelProbFlag`, {
    method: 'POST',
    body: params,
  });
}

export async function bmUploadFile(params) {
  return request(`/osApi/insAddDet/insAddBatchEdit`, {
    method: 'POST',
    body: params,
  });
}

export async function pUploadFile(params) {
  return request(`/osApi/insAddDet/insAddImport`, {
    method: 'POST',
    body: params,
  });
}

// 社保增员批量标记申报
export async function insImportAddFile(params) {
  return request(`/osApi/insAddDetExt/importInsAddTabDecl`, {
    method: 'POST',
    body: params,
  });
}

// 社保减员批量标记申报
export async function insImportReduceFile(params) {
  return request(`/osApi/insDeduDetExt/importInsDeduTabDecl`, {
    method: 'POST',
    body: params,
  });
}